package com.example.secondhand.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.secondhand.model.shUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserDao extends BaseMapper<shUser>{
    int deleteByPrimaryKey(Long id);

    int insertSelective(shUser record);

    shUser userLogin(@Param("accountNumber") String accountNumber, @Param("userPassword") String userPassword);

    List<shUser> getUserList();

    List<shUser> findUserByList(List<Long> idList);

    List<shUser> getNormalUser(int begin, int nums);

    List<shUser> getBanUser(int begin, int nums);

    int countNormalUser();

    int countBanUser();

    int updateByPrimaryKeySelective(shUser record);

    int updateByPrimaryKey(shUser record);

    int updatePassword(@Param("newPassword") String newPassword,
                       @Param("oldPassword") String oldPassword,@Param("id") Long id);
}